﻿
@{
    ViewBag.Title = "Format";
}

<h2>Number</h2>
<ul>
    <li>Tiền: @Html.FormatValue(ViewBag.Number1, "{0:C}")</li>
    <li>Phân nhóm: @Html.FormatValue(ViewBag.Number1, "{0:# ###.##0}")</li>
    <li>Phần trăm: @Html.FormatValue(ViewBag.Number2, "{0:p}")</li>
</ul>

<h2>Date</h2>
<ul>
    <li>Ngày việt: @Html.FormatValue(ViewBag.Date, "{0:dd-MM-yyyy}")</li>
    <li>Ngày anh: @Html.FormatValue(ViewBag.Date, "{0:D}")</li>
    <li>Giờ 12: @Html.FormatValue(ViewBag.Date, "{0:hh:mm:ss tt}")</li>
    <li>Giờ 24: @Html.FormatValue(ViewBag.Date, "{0:HH:mm:ss}")</li>
</ul>
<h2>Html</h2>
<ul>
    <li>@ViewBag.Html</li>
    <li>@Html.Raw(ViewBag.Html)</li>
</ul>
